<?php
require_once dirname(__FILE__) . '/../includes/common.inc.php';
require_once dirname(__FILE__) . '/../includes/pdoorm.inc.php';

header('Content-Type: text/plain');

$sql="
CREATE TABLE `ns_v1myorder` (
  `e_oid` int(12) NOT NULL AUTO_INCREMENT,
  `trackId` varchar(64) DEFAULT NULL,
  `createdDate` int(16) DEFAULT NULL,
  `flag` varchar(64) DEFAULT NULL,
  `type` varchar(64) DEFAULT NULL,
  `date` int(16) DEFAULT NULL,
  `disposaldate` int(16) DEFAULT NULL,
  `disposaluserAccount` varchar(64) DEFAULT NULL,
  `disposalstatus` tinyint(1) DEFAULT NULL,
  `disposalmessage` varchar(4096) DEFAULT NULL,  
  `price` decimal(10,2) DEFAULT NULL,
  `phototrackId` varchar(64) DEFAULT NULL,
  `photoname` varchar(256) DEFAULT NULL,
  `photoprice` decimal(10,2) DEFAULT NULL,
  `photohours` int(11) DEFAULT NULL,
  `photopersons` int(11) DEFAULT NULL,
  `photomakeup` varchar(64) DEFAULT NULL,
  `photooriginal` decimal(10,2) NOT NULL,
  `videotrackId` varchar(64) DEFAULT NULL,
  `videoname` varchar(256) DEFAULT NULL,
  `videoprice` decimal(10,2) DEFAULT NULL,
  `videohours` int(11) DEFAULT NULL,
  `videopersons` int(11) DEFAULT NULL,
  `videomakeup` varchar(64) DEFAULT NULL,
  `videooriginal` decimal(10,2) NOT NULL,  
  `note` varchar(4096) DEFAULT NULL,
  `customerId` int(11) DEFAULT NULL,
  `finished` tinyint(1) NOT NULL,
  `discount` decimal(10,2) NOT NULL,
  `isOrderDiscountSolved` int(11) NOT NULL,
  `isPayment1FirstSolved` int(11) NOT NULL,
  `isPayment1SecondSolved` int(11) NOT NULL,
  `isPayment1ThirdSolved` int(11) NOT NULL,
  `isPayment1ForthSolved` int(11) NOT NULL,
  `isPayment2FirstSolved` int(11) NOT NULL,
  `isPayment2SecondSolved` int(11) NOT NULL,
  `isPayment3FirstSolved` int(11) NOT NULL,
  `isPayment3SecondSolved` int(11) NOT NULL,
  `isPayment4Solved` int(11) NOT NULL,
  `isBonusPaid` tinyint(1) NOT NULL DEFAULT '0',
  `admAppr` tinyint(1) NOT NULL DEFAULT '0',
  `discAdmAppr` tinyint(1) NOT NULL DEFAULT '0',
  `isNoWeddingDaySolved` int(11) NOT NULL,
  PRIMARY KEY (`e_oid`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8
";

sql_execute($sql);
